import java.util.ArrayList;

public class ComparableEdge<E> extends Edge implements
		Comparable<ComparableEdge> {

	private ArrayList<E> path;
	private double weight;
	private Edge edge;

	public ComparableEdge(int to, double weight, ArrayList<E> path) {
		super(0, to);
		this.weight = weight;
		this.path = path;
	}

	public ComparableEdge(Edge e) {
		super(e.getSource(), e.getDest());
		weight = e.getWeight();
		this.edge = edge;
	}


	public int compareTo(ComparableEdge cE) {
		return Double.compare(getWeight(), cE.getWeight());

	}

	public ArrayList<E> getPath() {
		return path;
	}

	public void setPath(ArrayList<E> path) {
		this.path = path;
	}

	public double getWeight() {
		return this.weight;
	}
	public Edge getEdge(){
		return this.edge;
	}
}
